package cn.aylog.test;

import cn.aylog.dao.UserDao;
import cn.aylog.pojo.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:application.xml")
public class SpringMybatisDemo2 {

    @Autowired
    private UserDao dao;

    @Test
    public void run() {
        List<User> list = dao.selectAll();
        System.out.println(list);
    }

}
